package com.xgq.drink.service;

import com.alipay.api.AlipayApiException;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xgq.drink.entity.Payment;
import com.baomidou.mybatisplus.extension.service.IService;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import java.math.BigDecimal;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author xgq
 * @since 2025-03-04
 */
public interface IPaymentService extends IService<Payment> {
    public Payment savePayment(Payment payment);
    public Payment getPaymentByOrderId(Long orderId);
    public void updatePayment(Payment payment);
    public IPage<Payment> getPaymentList(int current, int size);
    public Payment getPaymentByVoucher(String voucher);
    boolean refund(String tradeNo, BigDecimal refundAmount) throws AlipayApiException;
    public boolean isNotifyProcessed(String notifyId);
}
